home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Reference Guide
/
C-C++ Interactive Reference Guide.iso
/
c_ref
/
csource4
/
273_01
/
triml.cc
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1987-09-27
|
505 b
|
20 lines
trim_l(char *str)
/* This will remove all blanks from the left side of the string
pointed to by *str.
*/
{
int non_blank_found = 0;
char *newstr;
newstr=str;
while(*str) {
if(*str==' ' && !non_blank_found)
str++;
else {
non_blank_found=1;
*newstr=*str;
newstr++; str++;
}
}
*newstr=0x00;
}